<script setup>
defineProps({
  header: {
    type: String,
    required: true
  },
  more: {
    type: Boolean,
    default: false
  }
})

// import { useOptionStore } from '@/stores/'

// const optionStore = useOptionStore()
</script>

<template>
  <el-card class="home-card" shadow="hover">
    <template #header>
      <div class="home-card-header">
        <div class="home-card-header-text">
          <span></span>
          {{ header }}
        </div>
        <RouterLink
          class="more"
          v-if="more"
          to="/paper"
          style="font-weight: 550"
          >更多</RouterLink
        >
      </div>
    </template>
    <slot name="body"></slot>
  </el-card>
</template>

<style lang="scss" scoped>
.home-card {
  margin: 0.1rem;
  border-radius: 0.12rem;
  &:deep(.el-card__header) {
    margin: 0 0.2rem;
  }
  .home-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .home-card-header-text {
      display: flex;
      letter-spacing: 0.01rem;
      font-size: 0.18rem;
      font-weight: bold;
      color: #303030;
      span {
        display: flex;
        width: 0.1rem;
        height: 0.24rem;
        background-color: skyblue;
        margin-right: 0.1rem;
      }
    }
    .more {
      font-size: 0.14rem;
      color: #303030;
      transition: all 0.3s;
      &:hover {
        color: #409eff;
      }
    }
  }
}
</style>
